= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 A u t h o r :   Y o u n g w o o k   K i m   ( K o r e a n ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 C o n t a c t :   r u m i a 0 6 0 1 @ g m a i l . c o m 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 0    0  %
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
  tǤ  0  G U I   0<\X  8
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 ^  й,   tǌ@  G U I |  0<\  \.   Uֈה,   tǌ@  2 D   %,   %  h|  X  2 D   G U I |  0<\  \.   ,   C U I Xֽ̹  9ה  tlX  p r i n t h  i n p u t h@Ɣ  tļD  t|  \.   t,   tǌX  Ť  h   p r i n t / i n p u t h|   XՔ ?    ,   \
  ŴX  0    %D  0Ɣ  \\  x   H e l l o   W o r l d !  \ȸ\  ̳D |  \.   ( t  \ȸҔ  @  	Ѭ  . t t f U֥ǐ|   ɔ  Ӹ  |D  DՔ\  \. ) 
 
 
 
 
 
 . .   i m a g e : :   B a s i c - o u p u t - s o u r c e c o d e . p n g 
 
       : c l a s s :   i n l i n e d - r i g h t 
 
 
 
 . .   c o d e - b l o c k : :   p y t h o n 
 
       : l i n e n o s : 
 
 
 
       i m p o r t   s y s ,   p y g a m e 
 
       p y g a m e . i n i t ( ) 
 
 
 
       s i z e   =   w i d t h ,   h e i g h t   =   2 2 0 ,   1 4 0 
 
       s p e e d   =   [ 2 ,   2 ] 
 
       b l a c k   =   0 ,   0 ,   0 
 
 
 
       s c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( s i z e ) 
 
 
 
       b a l l   =   p y g a m e . i m a g e . l o a d ( " B a s i c - o u p u t - s o u r c e c o d e . p n g " ) 
 
       b a l l r e c t   =   b a l l . g e t _ r e c t ( ) 
 
 
 
       w h i l e   1 : 
 
               f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) : 
 
                       i f   e v e n t . t y p e   = =   p y g a m e . Q U I T :   s y s . e x i t ( ) 
 
 
 
               b a l l r e c t   =   b a l l r e c t . m o v e ( s p e e d ) 
 
               i f   b a l l r e c t . l e f t   <   0   o r   b a l l r e c t . r i g h t   >   w i d t h : 
 
                       s p e e d [ 0 ]   =   - s p e e d [ 0 ] 
 
               i f   b a l l r e c t . t o p   <   0   o r   b a l l r e c t . b o t t o m   >   h e i g h t : 
 
                       s p e e d [ 1 ]   =   - s p e e d [ 1 ] 
 
 
 
               s c r e e n . f i l l ( b l a c k ) 
 
               s c r e e n . b l i t ( b a l l ,   b a l l r e c t ) 
 
               p y g a m e . d i s p l a y . f l i p ( ) 
 
 
 
 
 
 . .   i m a g e : :   B a g i c - o u p u t - r e s u l t - s c r e e n . p n g 
 
       : c l a s s :   i n l i n e d - r i g h t 
 
 
 
 . .   c o d e - b l o c k : :   p y t h o n 
 
       : l i n e n o s : 
 
 
 
       i m p o r t   s y s ,   p y g a m e 
 
       p y g a m e . i n i t ( ) 
 
 
 
       s i z e   =   w i d t h ,   h e i g h t   =   2 2 0 ,   1 4 0 
 
       s p e e d   =   [ 2 ,   2 ] 
 
       b l a c k   =   0 ,   0 ,   0 
 
 
 
       s c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( s i z e ) 
 
 
 
       b a l l   =   p y g a m e . i m a g e . l o a d ( " B a g i c - o u p u t - r e s u l t - s c r e e n . p n g " ) 
 
       b a l l r e c t   =   b a l l . g e t _ r e c t ( ) 
 
 
 
       w h i l e   1 : 
 
               f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) : 
 
                       i f   e v e n t . t y p e   = =   p y g a m e . Q U I T :   s y s . e x i t ( ) 
 
 
 
               b a l l r e c t   =   b a l l r e c t . m o v e ( s p e e d ) 
 
               i f   b a l l r e c t . l e f t   <   0   o r   b a l l r e c t . r i g h t   >   w i d t h : 
 
                       s p e e d [ 0 ]   =   - s p e e d [ 0 ] 
 
               i f   b a l l r e c t . t o p   <   0   o r   b a l l r e c t . b o t t o m   >   h e i g h t : 
 
                       s p e e d [ 1 ]   =   - s p e e d [ 1 ] 
 
 
 
               s c r e e n . f i l l ( b l a c k ) 
 
               s c r e e n . b l i t ( b a l l ,   b a l l r e c t ) 
 
               p y g a m e . d i s p l a y . f l i p ( ) 
 
 
 
 
 
 ( H e l l o   W o r l d   \ȸX    Tܴ@    ) 
 
 
 
 1 ɬ  p r i n t (  H e l l o   W o r l d !  )   DXt    Tܴ   d  X.   tǃ@  G U I Xֽ  MѤ¸Ҕ  \͌  5 X  l1  1( MѤ¸  ,   Ӹ,   l0,   ,   \) |   0  L8t.   G U I Xֽ  MѤ¸Ҕ  1 X  l1  1( MѤ¸  ) ̹D   \,   4 X  l1  1t     Ht.   x<\,   # 7 X  p y g a m e . d i s p l a y . s e t _ c a p t i o n (  H e l l o   W o r l d   P r o j e c t  ) h  p r i n t (  H e l l o   W o r l d   P r o j e c t  ) h@  ٳ|\  0D  \.   X̹,   t  h    8@  \X  ĳ  X    8t. 
 
 
 
  ,   4 |  %X0  t   Tܴ   Ż  1|  XՔ    D  .   Tܴ  4 X  <\       .   H e a d e r ( # 1 - # 2 ) ,   I n i t i a l 8( # 3 - # 1 2 ) ,   A l w a y s 8( # 1 3 - # 2 0 ) ,   E v e n t 8( # 1 6 - # 1 9 )    t. 
 
 
 
 H e a d e r  ,   ȴD  i m p o r t XՔ  t  .   0  i m p o r t   p y g a m e ,   s y s   m  DՔX.   t  \ȸ   tǌ  \ȸtp,   Ɛ   \D  ̸X  D  L  ̸|  X0  L8( \  # 1 9   s y s . e x i t ( )    )    x  $t  DՔ  Ŕ  \  8lt.   f r o m   p y g a m e . l o c a l s   i m p o r t *   # 1 7 X  Q U I T @   ǩ\  D     t  X0  t  pX  D<\  DՔX. 
 
   
 
 I n i t i a l 8( 4\  8  tX  8)  ,        \Ո̹  0Tp    h   \Ո̹  8֜.   \    @    t   ų1D  t0  t  0T.   tǌ@     D  XՔ  T$\  G U I D  L9   H.   ( t\)   X՘X  @  R ,   G ,   B   3 X  l1  ƌ|   .         r e d   =   ( 2 5 5 ,   0 ,   0 ) @  t   |  \.   p y g a m e . i n i t ( )   @  h    `  h|  t      ^  8֜|  \.   ( t  xX  h@    	Xՠ. ) 
 
 
 
 A l w a y s 8( 4\  8)  ,        Ĭ  ptǸp    h   Ĭ  8֜.   ( <`,   pt8t  ǔ    ptt  ޹D  L̹)   p y g a m e . d i s p l a y . u p d a t e ( )   |  h  |<\  x  / hX  ̬   ]  t  8֜p,   t  h  ̬X  <D  lа( =   Ȳ0)   %XՔ  ht0  L8t.   t  h   A l w a y s 8  ȹɹ    J<t,   %  Tt      pt0   \  |XX  JŔ  8   8    .   ( t  xX  h@    	Xՠ. ) 
 
 
 
 E v e n t 8(   tǤ|  lXՔ  8)  ,     tǤ   Xt  t   \  ̬   t踴.   p y g a m e . e v e n t . g e t ( )   h  A l w a y s 8  \  tǤX  0D  X\.     t  tǤ@  ٳ<\    <\  ,.   \,   f o r - i n 8D  t,   A l w a y s 8  \    tǤD  (<\  ̬`      ( tǤ  0) .   |  䴴,   # 1 7 - # 1 9   Q U I T |  tǤ|  ̬X  .   t  tǤ   Ҭpt,   tǌt  ̸  t  ¤\t  ̸  .   ( t  xX  h@    	Xՠ. ) 
 
 
 
 0  t       Xt,   t    |ǀ  hD  Ȉ  Xt   H e l l o   W o r l d !     %  `    .   \,   MѤ¸X  Ӹ@  l0   t8|  \.   p y g a m e . f o n t . F o n t (  H o o n W h i t e C a t R , t t f  ,   3 2 )   |  # 9 X  h  ȴ  tǄX  t t f |\  Ӹ|  X  l0  ( t    3 2 ) ĳ  \.   t  hX  X  @  m y T e x t F o n t |     ȥt  P.     m y T e x t F o n t X  r e n d e r (  H e l l o   W o r l d !  ,   T r u e ,   r e d ,   g r e e n ) |  # 1 0 X  hX  X  D  m y T e x t |     ȥt  P.   r e n d e r   h  MѤ¸    D  `    .   t  ,   MѤ¸X  @  h  ,   MѤ¸   D̲  lX  @  ]  t  .   m y T e x t X  g e t _ r e c t ( )   |  # 1 1 X  hX  X  D  m y T e x t A r e a |     ȥt  Pp,   m y T e x t A r e a   MѤ¸|  %X0  t  `  lD  X\.   g e t _ r e c t ( ) |  h  MѤ¸X  Ӹ  l0@  MѤ¸X  8t|  $X  \  ɬ  D  X\.   ̹}  m y T e x t A r e a |  X  c e n t e r |  d  |  MѤ¸   Tt  Y  $ƌT  \t,   ( # 1 2 )   MѤ¸X  X|  Tt  Y<\  $ƌ  L    . 
 
 
 
 X̹  Tt  YD  Ż  LDż    DL?    ,   TtX  ȴ  l0|  t|  \.   # 8 X  p y g a m e . d i s p l a y . s e t _ m o d e ( ( 6 4 0 , 4 8 0 ) )   h  ΄  ( l0,   ,   X  |   ɔ  t  d i s p l a y . u p d a t e h   8֜t  $ɔ  ) |  1X    l0|  6 4 0   x   4 8 0 <\  ¨.   t,   TtX  Y@  ( 3 2 0 ,   2 4 0 ) t.   TtX  ȴ  l0   Ut,   }X  Ĭ̹  Xt    XX  X|  `    ǌ  .   ( 2 D   G U I t\  %    @  x ,   y 1D   )   ( $xt  x \   l,   DŘt  y \   |D  t  H.   ^  й\  h@  P  I n i t i a l 8  |  XՔ  t,   \ƘXt  t  @  \  ĳ  ptǸ   DՔ  0  L8t. 
 
 
 
 <`,   f i l l h  b l i t h  hX  1  L8  A l w a y s 8  .   # 1 4 X  f i l l ( w h i t e )   h  ΄|  ( XՀ) <\  D̰Ɣ  0D  \.   # 1 5 X  b l i t ( m y T e x t ,   m y T e x t A r e a )     ( m y T e x t ) |    X( m y T e x t A r e a )     0D  \.   b l i t t  f i l l   t  |  \.     t  ΄  $  t,   ΄X  <@  d i s p l a y . u p d a t e h   t  %  . 
 
 
 
 tǃt  2 0 ɬ  Tܴ|  \  $t.   2 0 ɬ  Tܴ  X  ٳ  Ƭ|  ttXՔ  p  t  $Ƙ  x    .   X̹,   t  Tܴ  4 |   Xp  XՔ  @    5  JD  t.   t  TܴX  0    %D  \  0  Ĭ|  ttՈt  йt.   0  ̬  \D   XՔ  @  ŨL?   L  \ȸ  ɉ   t. 
 
 
 
 
 
 < 8  Tܴ>   : : 
 
 
 
         i m p o r t   p y g a m e ,   s y s   # 1 
 
         f r o m   p y g a m e . l o c a l s   i m p o r t *   # 2 
 
 
 
         w h i t e   =   ( 2 5 5 , 2 5 5 , 2 5 5 )   # 3 
 
         r e d   =   ( 2 5 5 , 0 , 0 )   # 4 
 
         g r e e n   =   ( 0 , 2 5 5 , 0 )   # 5 
 
         p y g a m e . i n i t ( )   # 6 
 
         p y g a m e . d i s p l a y . s e t _ c a p t i o n ( " H e l l o   W o r l d   P r o j e c t " )   # 7 
 
         m y S c r e e n   =   p y g a m e . d i s p l a y . s e t _ m o d e ( ( 6 4 0 ,   4 8 0 ) )   # 8 
 
         m y T e x t F o n t   =   p y g a m e . f o n t . F o n t ( " H o o n W h i t e c a t R . t t f " ,   3 2 )   # 9 
 
         m y T e x t   =   m y T e x t F o n t . r e n d e r ( " H e l l o   W o r l d ! " ,   T r u e ,   r e d ,   g r e e n )   # 1 0   
 
         m y T e x t A r e a   =   m y T e x t . g e t _ r e c t ( )   # 1 1 
 
         m y T e x t A r e a . c e n t e r   =   ( 3 2 0 ,   2 4 0 )   # 1 2 
 
 
 
         w h i l e   T r u e :   # 1 3 
 
                 m y S c r e e n . f i l l ( w h i t e )   # 1 4 
 
                 m y S c r e e n . b l i t ( m y T e x t ,   m y T e x t A r e a )   # 1 5 
 
 
 
                 f o r   e v e n t   i n   p y g a m e . e v e n t . g e t ( ) :   # 1 6 
 
                         i f   e v e n t . t y p e   = =   Q U I T :   # 1 7 
 
                                 p y g a m e . q u i t ( )   # 1 8 
 
                                 s y s . e x i t ( )   # 1 9 
 
 
 
                 p y g a m e . d i s p l a y . u p d a t e ( )   # 2 0 
 
 
 
 